<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>stop 修饰符</title>
    <style>
        .zone {
            background-color: aliceblue;
            height: 120px;
            width: 100%;

        }
    </style>
</head>
<body>
<div id="app">
    <div class="zone" @click="divClicked">
        <button @click="btnClicked">无修饰符</button>
        <br>
        <button @click.stop="btnClicked">有修饰符</button>
    </div>
</div>
<script type="module">
    import {createApp} from "../../../../../js/vue.esm-browser.js";

    const app = createApp({
        setup() {
            function divClicked() {
                console.log("点击了 div 区域");
            }

            function btnClicked() {
                console.log("点击了 button 区域");
            }

            return {
                divClicked, btnClicked,
            }
        }
    })

    app.mount("#app")
</script>
</body>
</html>